Skip to content

Conversation

@sabonerune
Copy link
Contributor

内容

タイトルバーの領域が狭くツールバーの表示領域が不足している場合ボタンの一部を折りたたむようにします。
これによりウインドウの幅が狭いときや開いているプロジェクトファイル名が長い場合にタイトルバーの表示が崩れてしまう問題を低減します。

ズームが100%のときはウインドウを最小幅にしても崩れないはずです。(倍率を上げた場合は崩れてしまいます。)

スクリーンショット・動画など

その他

ウインドウタイトルの位置が少しずれてしまいました。
ウインドウの中央ではなくツールバーと右のボタンの中央になってしまっています。
CSSで空間を無駄なく使いつつウインドウの中央に配置するのは自分では無理そうなので妥協しました。

@sabonerune sabonerune requested a review from a team as a code owner July 11, 2025 08:58
@sabonerune sabonerune requested review from Hiroshiba and removed request for a team July 11, 2025 08:58
@voicevox-preview-pages
Copy link

voicevox-preview-pages bot commented Jul 11, 2025

🚀 プレビュー用ページを作成しました 🚀

更新時点でのコミットハッシュ:86cbfd0

@sabonerune sabonerune marked this pull request as draft July 11, 2025 10:57
@sabonerune sabonerune marked this pull request as ready for review July 11, 2025 14:08
@sevenc-nanashi sevenc-nanashi requested a review from Copilot July 25, 2025 08:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses title bar display issues when the window width is narrow by implementing a collapsible toolbar system. When toolbar space is insufficient, some buttons are folded into an overflow menu to prevent layout breakage.

  • Implements button collapsing mechanism using intersection observer to hide buttons that don't fit
  • Adds overflow menu ("その他") to contain hidden buttons with teleport functionality
  • Updates menu item disable logic to handle additional locking states

Reviewed Changes

Copilot reviewed 3 out of 10 changed files in this pull request and generated 3 comments.

File Description
MenuBar.vue Main implementation of collapsible toolbar with intersection observer and overflow menu
MenuItem.vue Adds support for reloadingLock state in menu item disable logic
MenuButton.vue Updates disabled menu item check to include explicit disabled property

if (element.dataset.index == undefined) {
throw new Error("element.dataset.index is undefined");
}
isHidden.value[parseInt(element.dataset.index)] = !entry.isIntersecting;
Copy link

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseInt without a radix parameter can lead to unexpected behavior. Use parseInt(element.dataset.index, 10) to explicitly specify base 10.

Suggested change
isHidden.value[parseInt(element.dataset.index)] = !entry.isIntersecting;
isHidden.value[parseInt(element.dataset.index, 10)] = !entry.isIntersecting;

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これはなくてもいい気がします。
element.dataset.indexの値はMenubar.vue内で決まるので想定外の文字列が来ること自体を想定する必要はないと思います。
また、想定外の値が来ることを想定するなら値が配列の範囲内かの検証までやらないと不十分だと思います。

@Hiroshiba
Copy link
Member

@sevenc-nanashi ping


(いったんただのコメントです)
個人的には、可能であればデザイン的にはなるべくタイトル真ん中表示が良いよな~~~~という気はしています・・・!!

@sevenc-nanashi
Copy link
Member

手元でCSSを使って中央寄せできないか試しているんですけど、うまくいってないんですよね...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants